Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Drawing and Converting Image Files

Before drawing, you may wish to set various parameters. Among those you can configure are

These parameters are explained in detail in Table 16-2 .

Table 2 Drawing parameters you may configure

Parameters

Description

source rectangle Used to select a rectangular portion of the compressed image.
transformation matrix Used to shift, scale, rotate, and apply perspective to the source portion of the image. (Set this with SetMatrix, SetBoundsRect or SetDestRect.)
clipping region Used to restrict the area to be drawn in the destination space.
graphics transfer mode Used to define how source pixels modify destination pixels.
drawing quality Used to specify quality vs. time tradeoffs--for example, if you're drawing a JPEG image to an 8-bit color screen, the drawing quality determines whether a slower or faster dither will be used.
destination graphics port and device Defines the graphics environment for drawing.

Once you have set drawing parameters, you can call Draw to draw the image.

You can also call GraphicsImportGetAsPicture to get the image in the form of a QuickDraw picture handle, GraphicsImportSaveAsPicture to save it in a PICT file, or GraphicsImportSaveAsQuickTimeImage to save it in a QuickTime Image file. To export it to other image file formats, you can use GraphicsImportExportImageFile , or GraphicsImportDoExportImageFileDialog to present a standard "Export As..." dialog box.

When you are done with a graphics import component, you call CloseComponent .


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |